<template>
	<view class="">
		<u-form :model="form" ref="uForm">

			<view class="mode1"
				:style="{backgroundImage:'url('+url+'/uploads/user/images/20220623/50f5f288472e565b3b74a31e6c18b43c.png)'}">

				<view class="u-text-center" style="color: #fff;">
					<view class="" style="font-weight: bold;margin: 40rpx 0;font-size: 40rpx;">吉吉车</view>
					<view style="font-size: 30rpx;">欢迎成为吉吉车城市合伙人</view>
				</view>


				<view
					style="background: #FFFFFF;padding: 80rpx 40rpx;position: relative;top: 100rpx;border-radius: 40rpx 40rpx 0 0">

					<view
						style="border: 2rpx solid #E0E0E0;padding: 10rpx 20rpx;border-radius: 50rpx;margin-bottom: 40rpx;">
						<u-form-item :border-bottom='false' left-icon='account' label=" "
							:left-icon-style="{color:'#0064C6',fontSize:'32rpx'}">
							<u-input v-model="form.name" placeholder="请输入姓名" />
						</u-form-item>
					</view>

					<view
						style="border: 2rpx solid #E0E0E0;padding: 10rpx 20rpx;border-radius: 50rpx;margin-bottom: 40rpx;">
						<u-form-item :border-bottom='false' label=" " left-icon='phone'
							:left-icon-style="{color:'#0064C6',fontSize:'32rpx'}">
							<u-input v-model="form.mobile" placeholder="请输入电话" type="Number" maxlength="11" />
						</u-form-item>
					</view>

					<view
						style="border: 2rpx solid #E0E0E0;padding: 10rpx 20rpx;border-radius: 50rpx;margin-bottom: 40rpx">
						<u-form-item :border-bottom='false' label=" " left-icon='map'
							:left-icon-style="{color:'#0064C6',fontSize:'32rpx'}">
							<u-input v-model="form.address" placeholder="请输入店铺地址" />
						</u-form-item>
					</view>









					<u-button @click="submit" type="primary"
						:custom-style="{width:'600rpx',marginTop:'40rpx',background:'#0064C6'}" shape="circle">立即申请
					</u-button>

					<view class="" style="width: 600rpx;margin:40rpx auto;font-size: 20rpx;">
						<u-checkbox-group>
							<u-checkbox v-model="isread" :label-disabled="true">
								请认真阅读<text @click="read(6)">《用户服务协议及隐私政策》</text>
							</u-checkbox>
						</u-checkbox-group>
					</view>
				</view>


			</view>









		</u-form>

		<state ref='mask' icon='checkmark-circle-fill' iconcolor='#52C41A' tags='提交成功~'
			content="您的信息已提交成功，请耐心等待，招商经理与您联系！" @ready='ready'></state>


		<u-toast ref="uToast" />
	</view>
</template>

<script>
	import url from '@/common/baseUrl.js';
	import state from '../../components/state.vue'
	import upload_img from '../../components/upload_img.vue';
	export default {
		components: {
			upload_img,
			state
		},
		watch: {

		},
		data() {
			return {
				isread: false,
				url: url.url,
				form: {

					name: "",
					mobile: "",
					address: "",

				},

			}
		},
		onReady() {
			this.$refs.uForm.setRules(this.rules);
		},

		onLoad() {


		},
		methods: {
			read(e) {
				uni.navigateTo({
					url: '../help/detail?id=' + e
				})
			},

			submit() {
				if (!this.isread) {
					this.$u.toast("请认真阅读协议")
					return
				}
				this.$u.post('/api/index/apply', {
					name: this.form.name,
					phone: this.form.mobile,
					address: this.form.address,
				}).then(res => {
					this.$refs.mask.show = true
				}).catch(err => {
			
				})



			},
			ready(){
				uni.navigateBack({
					
				})
			}
		}
	}
</script>

<style>
	.u-form-item {
		padding: 0 !important;
	}



	.choose_area {
		margin-bottom: 10rpx !important;
	}

	.mode1 {
		height: 300rpx;
		display: inline-block;
		width: 750rpx;
	}
</style>
